package com.itheima.domain;

import java.io.Serializable;

public class Result implements Serializable {
    private boolean flag;//true表示操作成功,false表示操作失败
    //private  Integer code ; //状态码,类似于响应状态码,例如2001表示查询成功,2002表示查询失败;
    private String message;//封装响应信息
    private Object data;//封装查询结果

    public  Result(){}

    public Result(boolean flag,String message) {
        this.flag = flag;
        this.message= message;
    }

    public Result(boolean flag, String message, Object data) {
        this.flag = flag;
        this.message = message;
        this.data = data;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
